exports.callback = function(req, res, next) {
	server.Models.Port.findOne({
		id : req.params.port
	}, function(e, port) {
		var action = 'update';
		if (!port) {
			port = new server.Models.Port();
			port.hwAddress = req.params.port;
			action = 'add';
		}

		res.render('editPort.jade', {
			pageTitle : 'Port Configuration',
			port : port,
			action : action,
			pretty : true
		});
	});
};

exports.path = '/ports/:port';
exports.method = 'get';
